now there is a table for student, I want to copy this table data into a new table for dust, although can be copied with the following statement, always feel uncomfortable, I hope you help me, thank you. Answer 01:CREATE TABLE Dust SELECT * from
Select *, if (SVA = 1, "male", "female") as ssva from tableame where id = 1Quote control flow Functions
Case value when [compare-value] Then result [when [compare-value] Then result...] [else result] end case when [condition] Then result [when
In mysql, if we want to query records, we will use the select statement. Next I will summarize the various operations on the mysql select statement. If you need to learn more, please do not go to the reference.
The most common database operations
This article provides a quick and detailed understanding of the SELECT statements in the MySQL database. The basic syntax of the SELECT statement in MySQL is as follows: SELECT [STRAIGHT_JOIN] [SQL _SMALL_RESULT] [SQL _BIG_RESULT] [HIGH_PRIORITY]
MySQL quickly creates large amounts of data, copying (some or all) of the data from one table to another.
Usage: INSERT into table_name1 (field1,field2) SELECT field1,field2 from Table_name2;
Prerequisite conditions
The code is as
DML: Data Manipulation languageINSERTDELETESELECTUPDATESELECT:SELECT Select-list from tbname| tbnames| SELECT ACTION QualificationSelect-list Search ListDISTINCT, the same value is displayed only once.As Alias Field alias* All contentField fields
The most common operation of database is "plug, check, delete, change". In the previous log, I introduced the MySQL inserts INSERT statement, also introduced the update UPDATE statement for everyone, as well as deletes the statement delete and the
In MySQL, the select statement and the example bitsCN.com data table have been created. Suppose we have inserted a lot of data, we can search and display the information in the data table as we like. for example, we can display the content in the
The basic syntax of the SELECT statement in MySQL is: SELECT [STRAIGHT_JOIN] [SQL _SMALL_RESULT] [SQL _BIG_RESULT] [HIGH_PRIORITY] [DISTINCT | DISTINCTROW | ALL] select_list [INTO {OUTFILE | DUMPFILE} file_nameexport_options] [limit [limit]
The
How to export MySQL Data Using the SELECT... into outfile statement: select... outfile
The simplest way to export table data to a text file is to export the query results of the SELECT... into outfile statement directly to a file on the server
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.